#define  _CRT_SECURE_NO_WARNINGS

#include "Heap.h"

void TestHeap()
{
	int a[] = { 4,3,5,6,8,1,9,2 };
	Heap hp;
	HeapInit(&hp);
	for (int i = 0; i < sizeof(a) / sizeof(a[0]); i++)
	{
		HeapPush(&hp, a[i]);
	}

	while (!HeapEmpty(&hp))
	{
		HeapDataType top = HeapTop(&hp);
		printf("%d ", top);
		HeapPop(&hp);
	}
	printf("\n");

	HeapDestroy(&hp);
}

int main()
{
	TestHeap();

	return 0;
}